package com.googlecode.npgame;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.opengl.GLSurfaceView;
import android.os.Bundle;

import com.googlecode.npgame.assets.Assets;
import com.googlecode.npgame.graphics.NetworkProtocolGameSurfaceView;

/**
 * @author Josh (joshbruning)
 */
public class NetworkProtocolGameActivity extends Activity {

  private GLSurfaceView view;

  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Assets.preloadAssets(getAssets());
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    this.view = new NetworkProtocolGameSurfaceView(this);
    setContentView(this.view);
  }

  @Override
  protected void onPause() {
    super.onPause();
    this.view.onPause();
  }

  @Override
  protected void onResume() {
    super.onResume();
    this.view.onResume();
  }
}
